<template>
  <div class="add-form pingjia">
    <el-dialog :title="dialogTitle" :visible.sync="dialogFormVisible" width="30%">
      <el-form ref="dataForm" :model="formBase" label-position="left" label-width="150px">
        <el-form-item label="用户评价：" prop="orderId">
          <el-input type='textarea' autosize v-model="formBase.content" disabled></el-input>
        </el-form-item>
        <el-form-item prop="imgUrl">
          <div  class="block"  v-for="img in formBase.imgs" :key="img">
            <el-image style="width: 100px; height: 100px" :src="img"></el-image>
          </div>
        </el-form-item>
        <el-form-item label="质量评分：" prop="scoreQulity">
          <el-rate
            v-model="formBase.scoreQulity"
            disabled
            show-score
            text-color="#ff9900"
            score-template="{value}">
          </el-rate>
        </el-form-item>
        <el-form-item label="物流评分：" prop="scoreQulity">
          <el-rate
            v-model="formBase.scoreTransform"
            disabled
            show-score
            text-color="#ff9900"
            score-template="{value}">
          </el-rate>
        </el-form-item>
        <el-form-item label="商家态度评分：" prop="scoreQulity">
          <el-rate
            v-model="formBase.scoreStore"
            disabled
            show-score
            text-color="#ff9900"
            score-template="{value}">
          </el-rate>
        </el-form-item>
        <el-divider></el-divider>
        <el-form-item label="服务商家：" prop="storeSimpleName">
          <el-input v-model="formBase.storeSimpleName" disabled></el-input>
        </el-form-item>
        <el-form-item label="服务项目：" prop="serviceItems">
          <el-input v-model="formBase.serviceItems" disabled></el-input>
        </el-form-item>
        <el-form-item label="服务费用：" prop="serviceCost">
          <span class="money">{{'¥：' + formBase.serviceCost}}</span>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormH">返回</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { updateData, addData } from '@/api/orderAppraisal'
export default {
  name: 'add',
  props: ['dialogTitle'],
  data() {
    return {
      dialogFormVisible: false,
      formBase: {
        number: '',
        name: '',
        imgs: []
      }
    }
  },
  computed: {},
  methods: {
    // 弹层显示
    dialogFormV(val) {
      this.dialogFormVisible = true
      if (val !== undefined) {
        this.formBase = val
        if (this.formBase.imgUrl) {
          this.formBase.imgs = this.formBase.imgUrl.split(',')
        }
      }
    },
    // 弹层隐藏
    dialogFormH() {
      this.dialogFormVisible = false
    }
  },
  // 挂载结束

  mounted: function() {},
  // 创建完毕状态
  created() {
  },
  // 组件更新
  updated: function() {}
}
</script>
<style>
.pingjia .el-form-item__content{
  display: flex;
}
.el-form--label-left .el-form-item__label {
  text-align: right;
}
.el-form-item--medium {
  margin-bottom: 22px;
}
.el-dialog__footer {
  text-align: center;
}
.money {
  color: crimson;
}
</style>
